package apiTCP;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.io.*;
import java.net.*;
import java.net.UnknownHostException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * 
 * @author manelv8
 */
import Client.*;
import Factory.SocketFactory;
public class ClientAPI {
	public static void main(String[] args) {
		
			String hostname = "localhost";
			int port = 8080;
			InterfaceClientSocket cliente = SocketFactory.getClient(SocketFactory.TCP, port, hostname);
                        
                       
			cliente.enviarMsg("DAVI DAVI DAVI");
                        
			String msg = cliente.receberMsg();
                      
                        System.out.println(msg);
                          
			
		
	}
}
